let container = document.querySelector('.container');
let sub = document.querySelector('.submit');
let id = getQueryString('productid');
fetch('http://chst.vip:1234/api/getdiscountproduct?productid=' + id)
    .then(body => body.json())
    .then(res => {
        console.log(res)
        // let r=res.result[0];
        let el=""
        let se=""
        res.result.forEach(item => {
            let regExp = /^<[^<]+\s+src="([^''""]*)"/;
            let url = item.productImg.match(regExp);
            el = `<div class="title"><h4>${item.productName}</h4></div>
    <div class="other"><b>${item.productFrom} |${item.productTime} </b>&nbsp;&nbsp;&nbsp;&nbsp;<span>${item.productTips}</span>
    <p>${item.productPrice}</p>
    </div>
    <div class="describe">${item.productInfo}<img src=${url[1]} alt="" /></div>
    <div class="content"></div>`
        se = `${item.productComment}`
        })

        container.innerHTML = el;
        sub.innerHTML = se;
    })